/**
 * @Created by zhuly8 zhuly8@yusys.com.cn on 2019-8-5 09:59:16.
 * @updated by
 * @description 应用系统管理
 */
define(
	function (require, exports) {
		/**
		 * 页面加载完成时触发
		 * @param hashCode 路由ID
		 * @param data 传递数据对象
		 * @param cite 页面站点信息
		 */
		exports.ready = function (hashCode, data, cite) {
			// yufp.lookup.reg('USE_ALERTM_MODE');
			yufp.custom.vue({
				el: cite.el,
				data: function () {
					/*定义校验规则，只能填字母数字 下划线*/
					var valiCodes = function (rule, value, callback) {
						var reg = /^[0-9a-zA-Z_]{1,}$/;
						if (value && reg.test(value)) {
							if (value.length > 64) {
								callback(new Error('长度不能大于64位'));
							} else {
								callback();
							}
						} else if (value && !reg.test(value)) {
							callback(new Error('能填字母、数字和下划线'));
						} else {
							callback();
						}
					};
					return {
						rulesone: [
							{ validator: valiCodes, trigger: 'blur' }
						],
						searchFormdata: {},
						addFnButton: !yufp.session.checkCtrl('addFn'),
						updateFnButton: !yufp.session.checkCtrl('updateFn'),
						deleteFnButton: !yufp.session.checkCtrl('deleteFn'),
						dataUrl: 'api/citiccard/use/work/infoList',
						saveBtnShow: true,
						cancelBtnShow: true,
						formdata: {},
						isReadOnly: false,
						saveDisabled: false,
						async: false,
						height: yufp.frame.size().height,
						dialogVisible: false,
						viewTitleArrry: ['预警人员新增', '预警人员修改', '预警人员查看'],
						viewTitle: '',
						addFlag: true
					};
				},
				methods: {},
				mounted: function () {

				}
			});
		};
	});